<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="TOKN">﻿</span><span class="COMM">/*
<span class='line'>  2</span> Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
<span class='line'>  3</span> For licensing, see LICENSE.html or http://ckeditor.com/license
<span class='line'>  4</span> */</span><span class="WHIT">
<span class='line'>  5</span>
<span class='line'>  6</span> </span><span class="COMM">/**
<span class='line'>  7</span>  * @fileOverview Defines the {@link CKEDITOR.dom.element} class, which
<span class='line'>  8</span>  *		represents a DOM element.
<span class='line'>  9</span>  */</span><span class="WHIT">
<span class='line'> 10</span>
<span class='line'> 11</span> </span><span class="COMM">/**
<span class='line'> 12</span>  * Represents a DOM element.
<span class='line'> 13</span>  * @constructor
<span class='line'> 14</span>  * @augments CKEDITOR.dom.node
<span class='line'> 15</span>  * @param {Object|String} element A native DOM element or the element name for
<span class='line'> 16</span>  *		new elements.
<span class='line'> 17</span>  * @param {CKEDITOR.dom.document} [ownerDocument] The document that will contain
<span class='line'> 18</span>  *		the element in case of element creation.
<span class='line'> 19</span>  * @example
<span class='line'> 20</span>  * // Create a new &lt;span&gt; element.
<span class='line'> 21</span>  * var element = new CKEDITOR.dom.element( 'span' );
<span class='line'> 22</span>  * @example
<span class='line'> 23</span>  * // Create an element based on a native DOM element.
<span class='line'> 24</span>  * var element = new CKEDITOR.dom.element( document.getElementById( 'myId' ) );
<span class='line'> 25</span>  */</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="NAME">CKEDITOR.dom.element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ownerDocument</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">		</span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">ownerDocument</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">ownerDocument.$</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 30</span>
<span class='line'> 31</span> </span><span class="WHIT">	</span><span class="COMM">// Call the base constructor (we must not call CKEDITOR.dom.node).</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.dom.domObject.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span>
<span class='line'> 35</span> </span><span class="COMM">// PACKAGER_RENAME( CKEDITOR.dom.element )</span><span class="WHIT">
<span class='line'> 36</span>
<span class='line'> 37</span> </span><span class="COMM">/**
<span class='line'> 38</span>  * The the {@link CKEDITOR.dom.element} representing and element. If the
<span class='line'> 39</span>  * element is a native DOM element, it will be transformed into a valid
<span class='line'> 40</span>  * CKEDITOR.dom.element object.
<span class='line'> 41</span>  * @returns {CKEDITOR.dom.element} The transformed element.
<span class='line'> 42</span>  * @example
<span class='line'> 43</span>  * var element = new CKEDITOR.dom.element( 'span' );
<span class='line'> 44</span>  * alert( element == &lt;b>CKEDITOR.dom.element.get( element )&lt;/b> );  "true"
<span class='line'> 45</span>  * @example
<span class='line'> 46</span>  * var element = document.getElementById( 'myElement' );
<span class='line'> 47</span>  * alert( &lt;b>CKEDITOR.dom.element.get( element )&lt;/b>.getName() );  e.g. "p"
<span class='line'> 48</span>  */</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="NAME">CKEDITOR.dom.element.get</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element.$</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 53</span>
<span class='line'> 54</span> </span><span class="NAME">CKEDITOR.dom.element.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.node</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 55</span>
<span class='line'> 56</span> </span><span class="COMM">/**
<span class='line'> 57</span>  * Creates an instance of the {@link CKEDITOR.dom.element} class based on the
<span class='line'> 58</span>  * HTML representation of an element.
<span class='line'> 59</span>  * @param {String} html The element HTML. It should define only one element in
<span class='line'> 60</span>  *		the "root" level. The "root" element can have child nodes, but not
<span class='line'> 61</span>  *		siblings.
<span class='line'> 62</span>  * @returns {CKEDITOR.dom.element} The element instance.
<span class='line'> 63</span>  * @example
<span class='line'> 64</span>  * var element = &lt;b>CKEDITOR.dom.element.createFromHtml( '&lt;strong class="anyclass"&gt;My element&lt;/strong&gt;' )&lt;/b>;
<span class='line'> 65</span>  * alert( element.getName() );  // "strong"
<span class='line'> 66</span>  */</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="NAME">CKEDITOR.dom.element.createFromHtml</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">html</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ownerDocument</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">temp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ownerDocument</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="NAME">temp.setHtml</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 71</span>
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="COMM">// When returning the node, remove it from its parent to detach it.</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">temp.getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span>
<span class='line'> 76</span> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element.prototype</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends CKEDITOR.dom.element.prototype */</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'> 80</span> 		 * The node type. This is a constant value set to
<span class='line'> 81</span> 		 * {@link CKEDITOR.NODE_ELEMENT}.
<span class='line'> 82</span> 		 * @type Number
<span class='line'> 83</span> 		 * @example
<span class='line'> 84</span> 		 */</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">		</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.NODE_ELEMENT</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 86</span>
<span class='line'> 87</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'> 88</span> 		 * Adds a CSS class to the element. It appends the class to the
<span class='line'> 89</span> 		 * already existing names.
<span class='line'> 90</span> 		 * @param {String} className The name of the class to be added.
<span class='line'> 91</span> 		 * @example
<span class='line'> 92</span> 		 * var element = new CKEDITOR.dom.element( 'div' );
<span class='line'> 93</span> 		 * element.addClass( 'classA' );  // &lt;div class="classA"&gt;
<span class='line'> 94</span> 		 * element.addClass( 'classB' );  // &lt;div class="classA classB"&gt;
<span class='line'> 95</span> 		 * element.addClass( 'classA' );  // &lt;div class="classA classB"&gt;
<span class='line'> 96</span> 		 */</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">		</span><span class="NAME">addClass</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.className</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">regex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">RegExp</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'(?:^|\\s)'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'(?:\\s|$)'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">regex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">					</span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">			</span><span class="NAME">this.$.className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>108</span>
<span class='line'>109</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>110</span> 		 * Removes a CSS class name from the elements classes. Other classes
<span class='line'>111</span> 		 * remain untouched.
<span class='line'>112</span> 		 * @param {String} className The name of the class to remove.
<span class='line'>113</span> 		 * @example
<span class='line'>114</span> 		 * var element = new CKEDITOR.dom.element( 'div' );
<span class='line'>115</span> 		 * element.addClass( 'classA' );  // &lt;div class="classA"&gt;
<span class='line'>116</span> 		 * element.addClass( 'classB' );  // &lt;div class="classA classB"&gt;
<span class='line'>117</span> 		 * element.removeClass( 'classA' );  // &lt;div class="classB"&gt;
<span class='line'>118</span> 		 * element.removeClass( 'classB' );  // &lt;div&gt;
<span class='line'>119</span> 		 */</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">		</span><span class="NAME">removeClass</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.className</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">regex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">RegExp</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'(?:^|\\s+)'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'(?=\\s|$)'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">regex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">					</span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">c.replace</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">regex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="REGX">/^\s+/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>129</span>
<span class='line'>130</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">						</span><span class="NAME">this.$.className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">					</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">						</span><span class="NAME">this.removeAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'class'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>137</span>
<span class='line'>138</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>139</span> 		 * Append a node as a child of this element.
<span class='line'>140</span> 		 * @param {CKEDITOR.dom.node|String} node The node or element name to be
<span class='line'>141</span> 		 *		appended.
<span class='line'>142</span> 		 * @param {Boolean} [toStart] Indicates that the element is to be
<span class='line'>143</span> 		 *		appended at the start.
<span class='line'>144</span> 		 * @returns {CKEDITOR.dom.node} The appended node.
<span class='line'>145</span> 		 * @example
<span class='line'>146</span> 		 * var p = new CKEDITOR.dom.element( 'p' );
<span class='line'>147</span> 		 *
<span class='line'>148</span> 		 * var strong = new CKEDITOR.dom.element( 'strong' );
<span class='line'>149</span> 		 * &lt;b>p.append( strong );&lt;/b>
<span class='line'>150</span> 		 *
<span class='line'>151</span> 		 * var em = &lt;b>p.append( 'em' );&lt;/b>
<span class='line'>152</span> 		 *
<span class='line'>153</span> 		 * // result: "&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;"
<span class='line'>154</span> 		 */</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">		</span><span class="NAME">append</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">toStart</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">				</span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>159</span>
<span class='line'>160</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">toStart</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">				</span><span class="NAME">this.$.insertBefore</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node.$</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.$.firstChild</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">				</span><span class="NAME">this.$.appendChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node.$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span>
<span class='line'>165</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">node</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>167</span>
<span class='line'>168</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>169</span> 		 * Append text to this element.
<span class='line'>170</span> 		 * @param {String} text The text to be appended.
<span class='line'>171</span> 		 * @returns {CKEDITOR.dom.node} The appended node.
<span class='line'>172</span> 		 * @example
<span class='line'>173</span> 		 * var p = new CKEDITOR.dom.element( 'p' );
<span class='line'>174</span> 		 * p.appendText( 'This is' );
<span class='line'>175</span> 		 * p.appendText( ' some text' );
<span class='line'>176</span> 		 *
<span class='line'>177</span> 		 * // result: "&lt;p&gt;This is some text&lt;/p&gt;"
<span class='line'>178</span> 		 */</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">		</span><span class="NAME">appendText</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.text</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">				</span><span class="NAME">this.$.text</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">text</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">				</span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.text</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>186</span>
<span class='line'>187</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>188</span> 		 * Breaks one of the ancestor element in the element position, moving
<span class='line'>189</span> 		 * this element between the broken parts.
<span class='line'>190</span> 		 * @param {CKEDITOR.dom.element} parent The anscestor element to get broken.
<span class='line'>191</span> 		 * @example
<span class='line'>192</span> 		 * // Before breaking:
<span class='line'>193</span> 		 * //     &lt;b>This &lt;i>is some&lt;span /> sample&lt;/i> test text&lt;/b>
<span class='line'>194</span> 		 * // If "element" is &lt;span /> and "parent" is &lt;i>:
<span class='line'>195</span> 		 * //     &lt;b>This &lt;i>is some&lt;/i>&lt;span />&lt;i> sample&lt;/i> test text&lt;/b>
<span class='line'>196</span> 		 * element.breakParent( parent );
<span class='line'>197</span> 		 * @example
<span class='line'>198</span> 		 * // Before breaking:
<span class='line'>199</span> 		 * //     &lt;b>This &lt;i>is some&lt;span /> sample&lt;/i> test text&lt;/b>
<span class='line'>200</span> 		 * // If "element" is &lt;span /> and "parent" is &lt;b>:
<span class='line'>201</span> 		 * //     &lt;b>This &lt;i>is some&lt;/i>&lt;/b>&lt;span />&lt;b>&lt;i> sample&lt;/i> test text&lt;/b>
<span class='line'>202</span> 		 * element.breakParent( parent );
<span class='line'>203</span> 		 */</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">		</span><span class="NAME">breakParent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.range</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.getDocument</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>207</span>
<span class='line'>208</span> </span><span class="WHIT">			</span><span class="COMM">// We'll be extracting part of this element, so let's use our</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">			</span><span class="COMM">// range to get the correct piece.</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT">			</span><span class="NAME">range.setStartAfter</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>211</span> </span><span class="WHIT">			</span><span class="NAME">range.setEndAfter</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>212</span>
<span class='line'>213</span> </span><span class="WHIT">			</span><span class="COMM">// Extract it.</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">docFrag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">range.extractContents</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>215</span>
<span class='line'>216</span> </span><span class="WHIT">			</span><span class="COMM">// Move the element outside the broken element.</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">			</span><span class="NAME">range.insertNode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>218</span>
<span class='line'>219</span> </span><span class="WHIT">			</span><span class="COMM">// Re-insert the extracted piece after the element.</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT">			</span><span class="NAME">docFrag.insertAfterNode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>222</span>
<span class='line'>223</span> </span><span class="WHIT">		</span><span class="NAME">contains</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.webkit</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>225</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>226</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>228</span>
<span class='line'>229</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">node.type</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.NODE_ELEMENT</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">						</span><span class="NAME">$.contains</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node.getParent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">						</span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">node.$</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">$.contains</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node.$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">!</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.compareDocumentPosition</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node.$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>237</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>238</span>
<span class='line'>239</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>240</span> 		 * Moves the selection focus to this element.
<span class='line'>241</span> 		 * @example
<span class='line'>242</span> 		 * var element = CKEDITOR.document.getById( 'myTextarea' );
<span class='line'>243</span> 		 * &lt;b>element.focus()&lt;/b>;
<span class='line'>244</span> 		 */</span><span class="WHIT">
<span class='line'>245</span> </span><span class="WHIT">		</span><span class="NAME">focus</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>246</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT">			</span><span class="NAME">this.$.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>249</span>
<span class='line'>250</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>251</span> 		 * Gets the inner HTML of this element.
<span class='line'>252</span> 		 * @returns {String} The inner HTML of this element.
<span class='line'>253</span> 		 * @example
<span class='line'>254</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/div&gt;' );
<span class='line'>255</span> 		 * alert( &lt;b>p.getHtml()&lt;/b> );  // "&lt;b&gt;Example&lt;/b&gt;"
<span class='line'>256</span> 		 */</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">		</span><span class="NAME">getHtml</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.innerHTML</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>261</span>
<span class='line'>262</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>263</span> 		 * Sets the inner HTML of this element.
<span class='line'>264</span> 		 * @param {String} html The HTML to be set for this element.
<span class='line'>265</span> 		 * @returns {String} The inserted HTML.
<span class='line'>266</span> 		 * @example
<span class='line'>267</span> 		 * var p = new CKEDITOR.dom.element( 'p' );
<span class='line'>268</span> 		 * &lt;b>p.setHtml( '&lt;b&gt;Inner&lt;/b&gt; HTML' );&lt;/b>
<span class='line'>269</span> 		 *
<span class='line'>270</span> 		 * // result: "&lt;p&gt;&lt;b&gt;Inner&lt;/b&gt; HTML&lt;/p&gt;"
<span class='line'>271</span> 		 */</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT">		</span><span class="NAME">setHtml</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>273</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>276</span>
<span class='line'>277</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>278</span> 		 * Sets the element contents as plain text.
<span class='line'>279</span> 		 * @param {String} text The text to be set.
<span class='line'>280</span> 		 * @returns {String} The inserted text.
<span class='line'>281</span> 		 * @example
<span class='line'>282</span> 		 * var element = new CKEDITOR.dom.element( 'div' );
<span class='line'>283</span> 		 * element.setText( 'A > B & C &lt; D' );
<span class='line'>284</span> 		 * alert( element.innerHTML );  // "A &amp;gt; B &amp;amp; C &amp;lt; D"
<span class='line'>285</span> 		 */</span><span class="WHIT">
<span class='line'>286</span> </span><span class="WHIT">		</span><span class="NAME">setText</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.dom.element.prototype.setText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.innerText</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.innerText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">text</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>292</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.textContent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">text</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>297</span>
<span class='line'>298</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.setText</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>299</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>300</span>
<span class='line'>301</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>302</span> 		 * Gets the value of an element attribute.
<span class='line'>303</span> 		 * @function
<span class='line'>304</span> 		 * @param {String} name The attribute name.
<span class='line'>305</span> 		 * @returns {String} The attribute value or null if not defined.
<span class='line'>306</span> 		 * @example
<span class='line'>307</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;input type="text" /&gt;' );
<span class='line'>308</span> 		 * alert( &lt;b>element.getAttribute( 'type' )&lt;/b> );  // "text"
<span class='line'>309</span> 		 */</span><span class="WHIT">
<span class='line'>310</span> </span><span class="WHIT">		</span><span class="NAME">getAttribute</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>311</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">standard</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>314</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.getAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>315</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>316</span>
<span class='line'>317</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>318</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>319</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>320</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>321</span> </span><span class="WHIT">					</span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>322</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>323</span> </span><span class="WHIT">						</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'class'</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>324</span> </span><span class="WHIT">							</span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'className'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>325</span> </span><span class="WHIT">							</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>326</span>
<span class='line'>327</span> </span><span class="WHIT">						</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'tabindex'</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT">							</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">standard.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>329</span>
<span class='line'>330</span> </span><span class="WHIT">							</span><span class="COMM">// IE returns tabIndex=0 by default for all</span><span class="WHIT">
<span class='line'>331</span> </span><span class="WHIT">							</span><span class="COMM">// elements. For those elements,</span><span class="WHIT">
<span class='line'>332</span> </span><span class="WHIT">							</span><span class="COMM">// getAtrribute( 'tabindex', 2 ) returns 32768</span><span class="WHIT">
<span class='line'>333</span> </span><span class="WHIT">							</span><span class="COMM">// instead. So, we must make this check to give a</span><span class="WHIT">
<span class='line'>334</span> </span><span class="WHIT">							</span><span class="COMM">// uniform result among all browsers.</span><span class="WHIT">
<span class='line'>335</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.$.tabIndex</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>336</span> </span><span class="WHIT">								</span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>337</span>
<span class='line'>338</span> </span><span class="WHIT">							</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>339</span> </span><span class="WHIT">							</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>340</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>341</span>
<span class='line'>342</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">standard.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">standard</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>347</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>348</span>
<span class='line'>349</span> </span><span class="WHIT">		</span><span class="NAME">getChildren</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>350</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>351</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.nodeList</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.childNodes</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>352</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>353</span>
<span class='line'>354</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>355</span> 		 * Gets the current computed value of one of the element CSS style
<span class='line'>356</span> 		 * properties.
<span class='line'>357</span> 		 * @function
<span class='line'>358</span> 		 * @param {String} propertyName The style property name.
<span class='line'>359</span> 		 * @returns {String} The property value.
<span class='line'>360</span> 		 * @example
<span class='line'>361</span> 		 * var element = new CKEDITOR.dom.element( 'span' );
<span class='line'>362</span> 		 * alert( &lt;b>element.getComputedStyle( 'display' )&lt;/b> );  // "inline"
<span class='line'>363</span> 		 */</span><span class="WHIT">
<span class='line'>364</span> </span><span class="WHIT">		</span><span class="NAME">getComputedStyle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>365</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>366</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>367</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>368</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.currentStyle</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.cssStyleToDomStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>369</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>370</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>371</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>373</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">$.getComputedStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getPropertyValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>374</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>375</span>
<span class='line'>376</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>377</span> 		 * Gets the DTD entries for this element.
<span class='line'>378</span> 		 * @returns {Object} An object containing the list of elements accepted
<span class='line'>379</span> 		 *		by this element.
<span class='line'>380</span> 		 */</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT">		</span><span class="NAME">getDtd</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>382</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>383</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dtd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dtd</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">this.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>384</span>
<span class='line'>385</span> </span><span class="WHIT">			</span><span class="NAME">this.getDtd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>387</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">dtd</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>388</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>389</span>
<span class='line'>390</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">dtd</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>391</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>392</span>
<span class='line'>393</span> </span><span class="WHIT">		</span><span class="NAME">getElementsByTag</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tagName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>394</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>395</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.nodeList</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.getElementsByTagName</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tagName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>396</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>397</span>
<span class='line'>398</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>399</span> 		 * Gets the computed tabindex for this element.
<span class='line'>400</span> 		 * @function
<span class='line'>401</span> 		 * @returns {Number} The tabindex value.
<span class='line'>402</span> 		 * @example
<span class='line'>403</span> 		 * var element = CKEDITOR.document.getById( 'myDiv' );
<span class='line'>404</span> 		 * alert( &lt;b>element.getTabIndex()&lt;/b> );  // e.g. "-1"
<span class='line'>405</span> 		 */</span><span class="WHIT">
<span class='line'>406</span> </span><span class="WHIT">		</span><span class="NAME">getTabIndex</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>407</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>408</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>409</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>410</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.tabIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>411</span>
<span class='line'>412</span> </span><span class="WHIT">					</span><span class="COMM">// IE returns tabIndex=0 by default for all elements. In</span><span class="WHIT">
<span class='line'>413</span> </span><span class="WHIT">					</span><span class="COMM">// those cases we must check that the element really has</span><span class="WHIT">
<span class='line'>414</span> </span><span class="WHIT">					</span><span class="COMM">// the tabindex attribute set to zero, or it is one of</span><span class="WHIT">
<span class='line'>415</span> </span><span class="WHIT">					</span><span class="COMM">// those element that should have zero by default.</span><span class="WHIT">
<span class='line'>416</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">CKEDITOR.dtd.$tabIndex</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">this.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.getAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'tabindex'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>417</span> </span><span class="WHIT">						</span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>418</span>
<span class='line'>419</span> </span><span class="WHIT">						</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>420</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>421</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.webkit</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>422</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>423</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>424</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.tabIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>425</span>
<span class='line'>426</span> </span><span class="WHIT">					</span><span class="COMM">// Safari returns "undefined" for elements that should not</span><span class="WHIT">
<span class='line'>427</span> </span><span class="WHIT">					</span><span class="COMM">// have tabindex (like a div). So, we must try to get it</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT">					</span><span class="COMM">// from the attribute.</span><span class="WHIT">
<span class='line'>429</span> </span><span class="WHIT">					</span><span class="COMM">// https://bugs.webkit.org/show_bug.cgi?id=20596</span><span class="WHIT">
<span class='line'>430</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>431</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>432</span> </span><span class="WHIT">						</span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.getAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'tabindex'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>433</span>
<span class='line'>434</span> </span><span class="WHIT">						</span><span class="COMM">// If the element don't have the tabindex attribute,</span><span class="WHIT">
<span class='line'>435</span> </span><span class="WHIT">						</span><span class="COMM">// then we should return -1.</span><span class="WHIT">
<span class='line'>436</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>437</span> </span><span class="WHIT">							</span><span class="NAME">tabIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>438</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>439</span>
<span class='line'>440</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">tabIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>441</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>442</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>445</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.tabIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>446</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>447</span>
<span class='line'>448</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>449</span> 		 * Gets the text value of this element.
<span class='line'>450</span> 		 *
<span class='line'>451</span> 		 * Only in IE (which uses innerText), &lt;br&gt; will cause linebreaks,
<span class='line'>452</span> 		 * and sucessive whitespaces (including line breaks) will be reduced to
<span class='line'>453</span> 		 * a single space. This behavior is ok for us, for now. It may change
<span class='line'>454</span> 		 * in the future.
<span class='line'>455</span> 		 * @returns {String} The text value.
<span class='line'>456</span> 		 * @example
<span class='line'>457</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;Same &lt;i&gt;text&lt;/i&gt;.&lt;/div&gt;' );
<span class='line'>458</span> 		 * alert( &lt;b>element.getText()&lt;/b> );  // "Sample text."
<span class='line'>459</span> 		 */</span><span class="WHIT">
<span class='line'>460</span> </span><span class="WHIT">		</span><span class="NAME">getText</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>461</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>462</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.textContent</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.$.innerText</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>463</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>464</span>
<span class='line'>465</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>466</span> 		 * Gets the window object that contains this element.
<span class='line'>467</span> 		 * @returns {CKEDITOR.dom.window} The window object.
<span class='line'>468</span> 		 * @example
<span class='line'>469</span> 		 */</span><span class="WHIT">
<span class='line'>470</span> </span><span class="WHIT">		</span><span class="NAME">getWindow</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>471</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>472</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getDocument</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>473</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>474</span>
<span class='line'>475</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>476</span> 		 * Gets the value of the "id" attribute of this element.
<span class='line'>477</span> 		 * @returns {String} The element id, or null if not available.
<span class='line'>478</span> 		 * @example
<span class='line'>479</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;p id="myId"&gt;&lt;/p&gt;' );
<span class='line'>480</span> 		 * alert( &lt;b>element.getId()&lt;/b> );  // "myId"
<span class='line'>481</span> 		 */</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT">		</span><span class="NAME">getId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>483</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.id</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>486</span>
<span class='line'>487</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>488</span> 		 * Gets the value of the "name" attribute of this element.
<span class='line'>489</span> 		 * @returns {String} The element name, or null if not available.
<span class='line'>490</span> 		 * @example
<span class='line'>491</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;input name="myName"&gt;&lt;/input&gt;' );
<span class='line'>492</span> 		 * alert( &lt;b>element.getNameAtt()&lt;/b> );  // "myName"
<span class='line'>493</span> 		 */</span><span class="WHIT">
<span class='line'>494</span> </span><span class="WHIT">		</span><span class="NAME">getNameAtt</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>495</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>496</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.name</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>497</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>498</span>
<span class='line'>499</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>500</span> 		 * Gets the element name (tag name). The returned name is guaranteed to
<span class='line'>501</span> 		 * be always full lowercased.
<span class='line'>502</span> 		 * @returns {String} The element name.
<span class='line'>503</span> 		 * @example
<span class='line'>504</span> 		 * var element = new CKEDITOR.dom.element( 'span' );
<span class='line'>505</span> 		 * alert( &lt;b>element.getName()&lt;/b> );  // "span"
<span class='line'>506</span> 		 */</span><span class="WHIT">
<span class='line'>507</span> </span><span class="WHIT">		</span><span class="NAME">getName</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>508</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>509</span> </span><span class="WHIT">			</span><span class="COMM">// Cache the lowercased name inside a closure.</span><span class="WHIT">
<span class='line'>510</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nodeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.nodeName.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>511</span>
<span class='line'>512</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>513</span> </span><span class="WHIT">			</span><span class="COMM">/** @ignore */</span><span class="WHIT">
<span class='line'>514</span> </span><span class="WHIT">			</span><span class="NAME">this.getName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>515</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>516</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nodeName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>517</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>518</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>519</span>
<span class='line'>520</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>521</span> 		 * Gets the value set to this element. This value is usually available
<span class='line'>522</span> 		 * for form field elements.
<span class='line'>523</span> 		 * @returns {String} The element value.
<span class='line'>524</span> 		 */</span><span class="WHIT">
<span class='line'>525</span> </span><span class="WHIT">		</span><span class="NAME">getValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>527</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>528</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>529</span>
<span class='line'>530</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>531</span> 		 * Gets the first child node of this element.
<span class='line'>532</span> 		 * @returns {CKEDITOR.dom.node} The first child node or null if not
<span class='line'>533</span> 		 *		available.
<span class='line'>534</span> 		 * @example
<span class='line'>535</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/div&gt;' );
<span class='line'>536</span> 		 * var first = &lt;b>element.getFirst()&lt;/b>;
<span class='line'>537</span> 		 * alert( first.getName() );  // "b"
<span class='line'>538</span> 		 */</span><span class="WHIT">
<span class='line'>539</span> </span><span class="WHIT">		</span><span class="NAME">getFirst</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>540</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>541</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.firstChild</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>542</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.node</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>543</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>544</span>
<span class='line'>545</span> </span><span class="WHIT">		</span><span class="NAME">getLast</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>546</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>547</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.lastChild</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>548</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.node</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>549</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>550</span>
<span class='line'>551</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>552</span> 		 * Gets the node that follows this element in its parent's child list.
<span class='line'>553</span> 		 * @returns {CKEDITOR.dom.node} The next node or null if not
<span class='line'>554</span> 		 *		available.
<span class='line'>555</span> 		 * @example
<span class='line'>556</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt; &lt;i&gt;next&lt;/i&gt;&lt;/div&gt;' );
<span class='line'>557</span> 		 * var first = &lt;b>element.getFirst().getNext()&lt;/b>;
<span class='line'>558</span> 		 * alert( first.getName() );  // "i"
<span class='line'>559</span> 		 */</span><span class="WHIT">
<span class='line'>560</span> </span><span class="WHIT">		</span><span class="NAME">getNext</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>561</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>562</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.nextSibling</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>563</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.node</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>564</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>565</span>
<span class='line'>566</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>567</span> 		 * Checks if the element name matches one or more names.
<span class='line'>568</span> 		 * @param {String} name[,name[,...]] One or more names to be checked.
<span class='line'>569</span> 		 * @returns {Boolean} true if the element name matches any of the names.
<span class='line'>570</span> 		 * @example
<span class='line'>571</span> 		 * var element = new CKEDITOR.element( 'span' );
<span class='line'>572</span> 		 * alert( &lt;b>element.is( 'span' )&lt;/b> );  "true"
<span class='line'>573</span> 		 * alert( &lt;b>element.is( 'p', 'span' )&lt;/b> );  "true"
<span class='line'>574</span> 		 * alert( &lt;b>element.is( 'p' )&lt;/b> );  "false"
<span class='line'>575</span> 		 * alert( &lt;b>element.is( 'p', 'div' )&lt;/b> );  "false"
<span class='line'>576</span> 		 */</span><span class="WHIT">
<span class='line'>577</span> </span><span class="WHIT">		</span><span class="NAME">is</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>578</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>579</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>580</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>581</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>582</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>583</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>584</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>585</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>586</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>587</span>
<span class='line'>588</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>589</span> 		 * Indicates that the element has defined attributes.
<span class='line'>590</span> 		 * @returns {Boolean} True if the element has attributes.
<span class='line'>591</span> 		 * @example
<span class='line'>592</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div title="Test">Example&lt;/div>' );
<span class='line'>593</span> 		 * alert( &lt;b>element.hasAttributes()&lt;/b> );  "true"
<span class='line'>594</span> 		 * @example
<span class='line'>595</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div>Example&lt;/div>' );
<span class='line'>596</span> 		 * alert( &lt;b>element.hasAttributes()&lt;/b> );  "false"
<span class='line'>597</span> 		 */</span><span class="WHIT">
<span class='line'>598</span> </span><span class="WHIT">		</span><span class="NAME">hasAttributes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>599</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>600</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>601</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>602</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$.attributes</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>603</span>
<span class='line'>604</span> </span><span class="WHIT">					</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">attributes.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>605</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>606</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">attribute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>607</span>
<span class='line'>608</span> </span><span class="WHIT">						</span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attribute.nodeName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>609</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>610</span> </span><span class="WHIT">							</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'class'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>611</span> </span><span class="WHIT">								</span><span class="COMM">// IE has a strange bug. If calling removeAttribute('className'),</span><span class="WHIT">
<span class='line'>612</span> </span><span class="WHIT">								</span><span class="COMM">// the attributes collection will still contain the "class"</span><span class="WHIT">
<span class='line'>613</span> </span><span class="WHIT">								</span><span class="COMM">// attribute, which will be marked as "specified", even if the</span><span class="WHIT">
<span class='line'>614</span> </span><span class="WHIT">								</span><span class="COMM">// outerHTML of the element is not displaying the class attribute.</span><span class="WHIT">
<span class='line'>615</span> </span><span class="WHIT">								</span><span class="COMM">// Note : I was not able to reproduce it outside the editor,</span><span class="WHIT">
<span class='line'>616</span> </span><span class="WHIT">								</span><span class="COMM">// but I've faced it while working on the TC of #1391.</span><span class="WHIT">
<span class='line'>617</span> </span><span class="WHIT">								</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.$.className.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT">									</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>619</span>
<span class='line'>620</span> </span><span class="WHIT">							</span><span class="COMM">// Attributes to be ignored.</span><span class="WHIT">
<span class='line'>621</span> </span><span class="WHIT">							</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'_cke_expando'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>622</span> </span><span class="WHIT">								</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>623</span>
<span class='line'>624</span> </span><span class="WHIT">							</span><span class="COMM">/*jsl:fallthru*/</span><span class="WHIT">
<span class='line'>625</span>
<span class='line'>626</span> </span><span class="WHIT">							</span><span class="KEYW">default</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>627</span> </span><span class="WHIT">								</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attribute.specified</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>628</span> </span><span class="WHIT">									</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>629</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>630</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>631</span>
<span class='line'>632</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>633</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>634</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>635</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>636</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>637</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.$.attributes.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>638</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>639</span>
<span class='line'>640</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>641</span> 		 * Hides this element (display:none).
<span class='line'>642</span> 		 * @example
<span class='line'>643</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>644</span> 		 * &lt;b>element.hide()&lt;/b>;
<span class='line'>645</span> 		 */</span><span class="WHIT">
<span class='line'>646</span> </span><span class="WHIT">		</span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>647</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>648</span> </span><span class="WHIT">			</span><span class="NAME">this.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'display'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>649</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>650</span>
<span class='line'>651</span> </span><span class="WHIT">		</span><span class="NAME">moveChildren</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">target</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">toStart</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>652</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>653</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>654</span> </span><span class="WHIT">			</span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">target.$</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>655</span>
<span class='line'>656</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>657</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>658</span>
<span class='line'>659</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">child</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>660</span>
<span class='line'>661</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">toStart</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>662</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>663</span> </span><span class="WHIT">				</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$.lastChild</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>664</span> </span><span class="WHIT">					</span><span class="NAME">target.insertBefore</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$.removeChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">target.firstChild</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>665</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>666</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>667</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>668</span> </span><span class="WHIT">				</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$.firstChild</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>669</span> </span><span class="WHIT">					</span><span class="NAME">target.appendChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$.removeChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>670</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>671</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>672</span>
<span class='line'>673</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>674</span> 		 * Shows this element (display it).
<span class='line'>675</span> 		 * @example
<span class='line'>676</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>677</span> 		 * &lt;b>element.show()&lt;/b>;
<span class='line'>678</span> 		 */</span><span class="WHIT">
<span class='line'>679</span> </span><span class="WHIT">		</span><span class="NAME">show</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>680</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>681</span> </span><span class="WHIT">			</span><span class="NAME">this.setStyles</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>682</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>683</span> </span><span class="WHIT">					</span><span class="NAME">display</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>684</span> </span><span class="WHIT">					</span><span class="NAME">visibility</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT">
<span class='line'>685</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>687</span>
<span class='line'>688</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>689</span> 		 * Sets the value of an element attribute.
<span class='line'>690</span> 		 * @param {String} name The name of the attribute.
<span class='line'>691</span> 		 * @param {String} value The value to be set to the attribute.
<span class='line'>692</span> 		 * @function
<span class='line'>693</span> 		 * @returns {CKEDITOR.dom.element} This element instance.
<span class='line'>694</span> 		 * @example
<span class='line'>695</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>696</span> 		 * &lt;b>element.setAttribute( 'class', 'myClass' )&lt;/b>;
<span class='line'>697</span> 		 * &lt;b>element.setAttribute( 'title', 'This is an example' )&lt;/b>;
<span class='line'>698</span> 		 */</span><span class="WHIT">
<span class='line'>699</span> </span><span class="WHIT">		</span><span class="NAME">setAttribute</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>700</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>701</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">standard</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>702</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>703</span> </span><span class="WHIT">				</span><span class="NAME">this.$.setAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>704</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>705</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>706</span>
<span class='line'>707</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>708</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>709</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>710</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>711</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'class'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>712</span> </span><span class="WHIT">						</span><span class="NAME">this.$.className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>713</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'style'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>714</span> </span><span class="WHIT">						</span><span class="NAME">this.$.style.cssText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>715</span> </span><span class="WHIT">					</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>716</span> </span><span class="WHIT">						</span><span class="NAME">standard.apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>717</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>718</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>719</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>720</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>721</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">standard</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>722</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>723</span>
<span class='line'>724</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>725</span> 		 * Sets the value of several element attributes.
<span class='line'>726</span> 		 * @param {Object} attributesPairs An object containing the names and
<span class='line'>727</span> 		 *		values of the attributes.
<span class='line'>728</span> 		 * @returns {CKEDITOR.dom.element} This element instance.
<span class='line'>729</span> 		 * @example
<span class='line'>730</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>731</span> 		 * &lt;b>element.setAttributes({
<span class='line'>732</span> 		 *     'class' : 'myClass',
<span class='line'>733</span> 		 *     'title' : 'This is an example' })&lt;/b>;
<span class='line'>734</span> 		 */</span><span class="WHIT">
<span class='line'>735</span> </span><span class="WHIT">		</span><span class="NAME">setAttributes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributesPairs</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>736</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>737</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attributesPairs</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>738</span> </span><span class="WHIT">				</span><span class="NAME">this.setAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attributesPairs</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>739</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>740</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>741</span>
<span class='line'>742</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>743</span> 		 * Sets the element value. This function is usually used with form
<span class='line'>744</span> 		 * field element.
<span class='line'>745</span> 		 * @param {String} value The element value.
<span class='line'>746</span> 		 * @returns {CKEDITOR.dom.element} This element instance.
<span class='line'>747</span> 		 */</span><span class="WHIT">
<span class='line'>748</span> </span><span class="WHIT">		</span><span class="NAME">setValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>749</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>750</span> </span><span class="WHIT">			</span><span class="NAME">this.$.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>751</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>752</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>753</span>
<span class='line'>754</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>755</span> 		 * Removes an attribute from the element.
<span class='line'>756</span> 		 * @param {String} name The attribute name.
<span class='line'>757</span> 		 * @function
<span class='line'>758</span> 		 * @example
<span class='line'>759</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div class="classA">&lt;/div>' );
<span class='line'>760</span> 		 * element.removeAttribute( 'class' );
<span class='line'>761</span> 		 */</span><span class="WHIT">
<span class='line'>762</span> </span><span class="WHIT">		</span><span class="NAME">removeAttribute</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>763</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>764</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">standard</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>765</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>766</span> </span><span class="WHIT">				</span><span class="NAME">this.$.removeAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>767</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>768</span>
<span class='line'>769</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>770</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>771</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>772</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>773</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'class'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>774</span> </span><span class="WHIT">						</span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'className'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>775</span> </span><span class="WHIT">					</span><span class="NAME">standard.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>776</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>777</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>778</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>779</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">standard</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>780</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>781</span>
<span class='line'>782</span> </span><span class="WHIT">		</span><span class="NAME">removeAttributes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>783</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>784</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">attributes.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>785</span> </span><span class="WHIT">				</span><span class="NAME">this.removeAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>786</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>787</span>
<span class='line'>788</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>789</span> 		 * Removes a style from the element.
<span class='line'>790</span> 		 * @param {String} name The style name.
<span class='line'>791</span> 		 * @function
<span class='line'>792</span> 		 * @example
<span class='line'>793</span> 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div style="display:none">&lt;/div>' );
<span class='line'>794</span> 		 * element.removeStyle( 'display' );
<span class='line'>795</span> 		 */</span><span class="WHIT">
<span class='line'>796</span> </span><span class="WHIT">		</span><span class="NAME">removeStyle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>797</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>798</span> </span><span class="WHIT">			</span><span class="NAME">this.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>799</span>
<span class='line'>800</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.$.style.cssText</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>801</span> </span><span class="WHIT">				</span><span class="NAME">this.removeAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'style'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>802</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>803</span>
<span class='line'>804</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>805</span> 		 * Sets the value of an element style.
<span class='line'>806</span> 		 * @param {String} name The name of the style. The CSS naming notation
<span class='line'>807</span> 		 *		must be used (e.g. "background-color").
<span class='line'>808</span> 		 * @param {String} value The value to be set to the style.
<span class='line'>809</span> 		 * @returns {CKEDITOR.dom.element} This element instance.
<span class='line'>810</span> 		 * @example
<span class='line'>811</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>812</span> 		 * &lt;b>element.setStyle( 'background-color', '#ff0000' )&lt;/b>;
<span class='line'>813</span> 		 * &lt;b>element.setStyle( 'margin-top', '10px' )&lt;/b>;
<span class='line'>814</span> 		 * &lt;b>element.setStyle( 'float', 'right' )&lt;/b>;
<span class='line'>815</span> 		 */</span><span class="WHIT">
<span class='line'>816</span> </span><span class="WHIT">		</span><span class="NAME">setStyle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>817</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>818</span> </span><span class="WHIT">			</span><span class="NAME">this.$.style</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.cssStyleToDomStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>819</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>820</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>821</span>
<span class='line'>822</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>823</span> 		 * Sets the value of several element styles.
<span class='line'>824</span> 		 * @param {Object} stylesPairs An object containing the names and
<span class='line'>825</span> 		 *		values of the styles.
<span class='line'>826</span> 		 * @returns {CKEDITOR.dom.element} This element instance.
<span class='line'>827</span> 		 * @example
<span class='line'>828</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>829</span> 		 * &lt;b>element.setStyles({
<span class='line'>830</span> 		 *     'position' : 'absolute',
<span class='line'>831</span> 		 *     'float' : 'right' })&lt;/b>;
<span class='line'>832</span> 		 */</span><span class="WHIT">
<span class='line'>833</span> </span><span class="WHIT">		</span><span class="NAME">setStyles</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">stylesPairs</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>834</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>835</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">stylesPairs</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>836</span> </span><span class="WHIT">				</span><span class="NAME">this.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">stylesPairs</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>837</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>838</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>839</span>
<span class='line'>840</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>841</span> 		 * Sets the opacity of an element.
<span class='line'>842</span> 		 * @param {Number} opacity A number within the range [0.0, 1.0].
<span class='line'>843</span> 		 * @example
<span class='line'>844</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>845</span> 		 * &lt;b>element.setOpacity( 0.75 )&lt;/b>;
<span class='line'>846</span> 		 */</span><span class="WHIT">
<span class='line'>847</span> </span><span class="WHIT">		</span><span class="NAME">setOpacity</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">opacity</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>848</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>849</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>850</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>851</span> </span><span class="WHIT">				</span><span class="NAME">opacity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.round</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">opacity</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>852</span> </span><span class="WHIT">				</span><span class="NAME">this.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'filter'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opacity</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'progid:DXImageTransform.Microsoft.Alpha(opacity='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">opacity</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>853</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>854</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>855</span> </span><span class="WHIT">				</span><span class="NAME">this.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'opacity'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opacity</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>856</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>857</span>
<span class='line'>858</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>859</span> 		 * Makes the element and its children unselectable.
<span class='line'>860</span> 		 * @function
<span class='line'>861</span> 		 * @example
<span class='line'>862</span> 		 * var element = CKEDITOR.dom.element.getById( 'myElement' );
<span class='line'>863</span> 		 * element.unselectable();
<span class='line'>864</span> 		 */</span><span class="WHIT">
<span class='line'>865</span> </span><span class="WHIT">		</span><span class="NAME">unselectable</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>866</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.env.gecko</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>867</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>868</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>869</span> </span><span class="WHIT">					</span><span class="NAME">this.$.style.MozUserSelect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>870</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>871</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.webkit</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>872</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>873</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>874</span> </span><span class="WHIT">					</span><span class="NAME">this.$.style.KhtmlUserSelect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>875</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>876</span> </span><span class="WHIT">			</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>877</span> </span><span class="WHIT">				</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>878</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>879</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.opera</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>880</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>881</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.$</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>882</span> </span><span class="WHIT">							</span><span class="NAME">e</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>883</span> </span><span class="WHIT">							</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>884</span>
<span class='line'>885</span> </span><span class="WHIT">						</span><span class="NAME">element.unselectable</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'on'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>886</span>
<span class='line'>887</span> </span><span class="WHIT">						</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">element.all</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>888</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>889</span> </span><span class="WHIT">							</span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">e.tagName.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>890</span> </span><span class="WHIT">							</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>891</span> </span><span class="WHIT">								</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'iframe'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>892</span> </span><span class="WHIT">								</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'textarea'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>893</span> </span><span class="WHIT">								</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'input'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>894</span> </span><span class="WHIT">								</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'select'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>895</span> </span><span class="WHIT">									</span><span class="COMM">/* Ignore the above tags */</span><span class="WHIT">
<span class='line'>896</span> </span><span class="WHIT">									</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>897</span> </span><span class="WHIT">								</span><span class="KEYW">default</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>898</span> </span><span class="WHIT">									</span><span class="NAME">e.unselectable</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'on'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>899</span> </span><span class="WHIT">							</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>900</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>901</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>902</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>903</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>904</span> </span></pre></body></html>
